// TransformView.h : interface of the CTransformView class
//


#pragma once

#include "OpenGL.h"
#include <afxcview.h>

class CViewOper;

class CTransformView : public CView
{
protected: // create from serialization only
	CTransformView();
	DECLARE_DYNCREATE(CTransformView)

// Attributes
public:

// Operations
public:
	void			UpdateView();
	CDC*			RefreshView();

// Overrides
public:
	virtual void OnDraw(CDC* pDC);  // overridden to draw this view
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:

// Implementation
public:
	virtual ~CTransformView();

	CGraphicsPlatform*				GetPlatform() { return m_pPlatform; }

protected:

// Generated message map functions
protected:
	afx_msg int						OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void					OnDestroy();
	afx_msg void					OnSize(UINT nType, int cx, int cy);
	afx_msg void					OnLButtonDown(UINT nFlags, CPoint point);
	afx_msg void					OnLButtonUp(UINT nFlags, CPoint point);
	afx_msg void					OnRButtonDblClk(UINT nFlags, CPoint point);
	afx_msg void					OnTimer(UINT_PTR nIDEvent);
	afx_msg void					OnMouseMove(UINT nFlags, CPoint point);
	afx_msg void					OnMButtonDown(UINT nFlags, CPoint point);
	afx_msg void					OnMButtonUp(UINT nFlags, CPoint point);
	afx_msg BOOL					OnMouseWheel(UINT nFlags, short zDelta, CPoint pt);
	afx_msg void					OnRButtonDown(UINT nFlags, CPoint point);
	afx_msg void					OnRButtonUp(UINT nFlags, CPoint point);
	DECLARE_MESSAGE_MAP()

private:
	CGraphicsPlatform*				m_pPlatform;
	CGViewer*						m_pViewer;

	bool							m_bPaning;
	bool							m_bRotating;
	bool							m_bSelecting;
};

#ifndef _DEBUG  // debug version in TransformView.cpp
inline CTransformDoc* CTransformView::GetDocument() const
   { return reinterpret_cast<CTransformDoc*>(m_pDocument); }
#endif

